#include "common.hpp"

int main()
{
   int shmid = getshm();
   char* addr = (char*)shmat(shmid, 0, 0);
   int fd = open(FIFO_FILE, O_WRONLY);

   while (true)
   {
      cout << "please enter:";
      fgets(addr, 1024, stdin);
      //通知对方
      write(fd, "c", 1);
   }
   int ret = shmdt(addr);
   return 0;
}